﻿@namespace Microsoft.FluentUI.AspNetCore.Components
@inherits ListComponentBase<TOption>
@typeparam TOption
<CascadingValue Value="_internalListContext" Name="ListContext" TValue="InternalListContext<TOption>" IsFixed="true">
    @InlineStyleValue
    <FluentInputLabel ForId="@Id" Label="@Label" AriaLabel="@GetAriaLabelWithRequired()" Required="@Required" ChildContent="@LabelTemplate" />
    <fluent-select @ref=Element
                   id=@Id
                   class="@ClassValue"
                   style="@StyleValue"
                   open="@Open"
                   position="@Position.ToAttributeValue()"
                   multiple="@Multiple"
                   disabled="@Disabled"
                   appearance="@Appearance.ToAttributeValue()"
                   current-value="@Value"
                   required="@Required"
                   name="@Name"
                   @onchange="@ChangeHandlerAsync"
                   @onkeydown="@OnKeydownHandlerAsync"
                   @attributes="AdditionalAttributes">
        @_renderOptions
    </fluent-select>
</CascadingValue>
